package maze;
/**
 * Representation of a straight path - relevant to <strong>Mechanisms</strong> and <strong>Controls</strong> groups.
 * 
 * <p>Equivalent of a directed edge in a weighted, directed graph (
 * <strong>Controls</strong> group).</p>
 * Development stage: should be usable as-is.
 * @author Calvin
 */
public class Vector {
	public static final double UNKNOWN = Double.NaN;
	public double magnitude;
	public Direction direction;
	
	/**
	 * @param magnitude Magnitude can actually be measured in either (milli)seconds or (milli)meters.
	 * Time might actually be a better idea since for the race optimality is determined
	 * by time, not distance.
	 * @param direction
	 * @see Direction#estimate(double)
	 */
	public Vector(double magnitude, Direction direction){
		this.magnitude = magnitude;
		this.direction = direction;
	}
	
	public Vector reverse(){
		return new Vector(magnitude, direction.reverse());
	}
	
}
